<template>
	<view class="centerBox" v-if="datainfo">
		<view class="centerBox1">
			<!-- 主体 -->
			<view class="boxCenter">
				<view class="boxCenter-item">
					<view class="boxCenter-item-left">
						所属项目
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.projectName}}
					</view>
				</view>
				<view class="boxCenter-item">
					<view class="boxCenter-item-left">
						楼栋楼层
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.buildingName}}-{{datainfo.layer}}F
					</view>
				</view>
				<view class="boxCenter-item">
					<view class="boxCenter-item-left">
						楼栋方向
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.buildDirection?datainfo.buildDirection:'-'}}
					</view>
				</view>
				<view class="boxCenter-item">
					<view class="boxCenter-item-left">
						构件编号
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.componentCode}}
					</view>
				</view>
				<view class="boxCenter-item">
					<view class="boxCenter-item-left">
						构件类型
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.componentTypeLabel}}
					</view>
				</view>
				<view class="boxCenter-item">
					<view class="boxCenter-item-left">
						构件型号
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.componentModel}}
					</view>
				</view>
				<view class="boxCenter-item">
					<view class="boxCenter-item-left">
						单体体积
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.monomerVolume}}m³
					</view>
				</view>
				<view class="boxCenter-item">
					<view class="boxCenter-item-left">
						单体重量
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.monomerWeight}}T
					</view>
				</view>
				<view class="boxCenter-item">
					<view class="boxCenter-item-left">
						外观尺寸（长*宽*高）
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.sizeLong}}*{{datainfo.sizeWide}}*{{datainfo.sizeHigh}}mm
					</view>
				</view>
				<view class="boxCenter-item">
					<view class="boxCenter-item-left">
						减重板体积
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.plateVolume}}m³
					</view>
				</view>
				<view class="boxCenter-item">
					<view class="boxCenter-item-left">
						砼用量
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.concreteConsumption}}m³
					</view>
				</view>
				<view class="boxCenter-item" style="border: none;">
					<view class="boxCenter-item-left">
						砼标号
					</view>
					<view class="boxCenter-item-right">
						{{datainfo.concreteGrade}}
					</view>
				</view>
			</view>

			<!-- 颜色块 -->
			<view style="background-color: #F2F6FC;height: 28rpx;width: 100%;"></view>
			<view v-if="datainfo.storagePagesPageList&&datainfo.storagePagesPageList.length" style="padding: 0rpx 28rpx;">
				<!-- 清单明细 -->
				<view class="centerBox1" style="padding-top: 28rpx;">
					<!-- 标题 -->
					<view class="centerBox1-title">图纸信息</view>
					<view v-for="(item,index) in datainfo.storagePagesPageList" :key="item.id">
						<view class="items">
							<view class="titlesd">
								<view style="font-size: 30rpx;color: #303133;" class="centeritem">
									<view class="lefts">
										{{item.drawingName.split('.').slice(0, -1).join('.')}}
									</view>
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">创建时间：</span>{{item.createTime}}
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">创建人：</span>{{item.updateBy}}
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">更新时间：</span>{{item.updateTime}}
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">图纸文件：</span>
									<view class="item-box">
										<fileUpload v-model="datainfo.fileIdsList" :showUploadIcon="false" :showsDelete="false" />
									</view>
									<!-- <span @tap="openfile(item)" style="color: #18A7F0;">
										{{ item.drawingName }}
									</span> -->
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 颜色块 -->
			<view style="background-color: #F2F6FC;height: 28rpx;width: 100%;"></view>
			<view v-if="datainfo.materialList&&datainfo.materialList.length" style="padding: 0rpx 28rpx;">
				<!-- 清单明细 -->
				<view class="centerBox1" style="padding-top: 28rpx;">
					<!-- 标题 -->
					<view class="centerBox1-title">物料清单</view>
					<view v-for="(item,index) in datainfo.materialList" :key="item.id">
						<view class="items">
							<view class="titlesd">
								<view style="font-size: 30rpx;color: #303133;" class="centeritem">
									<view class="lefts">
										{{item.materialCode}}
									</view>
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">物料分类：</span>{{item.materialClassDictLabel}}
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">物料规格：</span>{{item.specificationsDictLabel}}
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">物料名称：</span>{{item.materialNameDictLabel}}
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">计量单位：</span>{{item.unitDictLabel}}
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">数量：</span>{{item.quantity}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 颜色块 -->
			<view style="background-color: #F2F6FC;height: 28rpx;width: 100%;"></view>
			<view v-if="datainfo.steelList&&datainfo.steelList.length" style="padding: 0rpx 28rpx;">
				<!-- 清单明细 -->
				<view class="centerBox1" style="padding-top: 28rpx;">
					<!-- 标题 -->
					<view class="centerBox1-title">钢筋清单</view>
					<view v-for="(item,index) in datainfo.steelList" :key="item.id">
						<view class="items">
							<view class="titlesd">
								<view style="font-size: 30rpx;color: #303133;" class="centeritem">
									<view class="lefts">
										{{item.materialCode}}
									</view>
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">钢筋分类：</span>{{item.materialClassDictLabel}}
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">钢筋直径：</span>{{item.specificationsDictLabel}}
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">钢筋名称：</span>{{item.materialNameDictLabel}}
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">计量单位：</span>{{item.unitDictLabel}}
								</view>
								<view class="fs28" style="margin-top: 15rpx;color: #303133;">
									<span style="color: #606266;">数量：</span>{{item.quantity}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 颜色块 -->
			<view style="background-color: #F2F6FC;height: 28rpx;width: 100%;"></view>
			<view v-if="datainfo.componentRecordMap&&datainfo.componentRecordMap.length" style="padding: 0 28rpx;">
				<!-- 清单明细 -->
				<view class="centerBox1" style="padding-top: 28rpx;">
					<!-- 标题 -->
					<view class="centerBox1-title">构件溯源记录</view>

					<view class="aitems">
						<view class="itemprocess" v-for="v,i in datainfo.componentRecordMap" :key="i"
							:style="{'padding-top': v.componentRecordNode==1?'0rpx':'35rpx'}">
							<view class="itemprocess1">
								<view style="color: #000;font-weight: bold;font-size: 30rpx;">
									{{filterNode(v.componentRecordNode)}}
								</view>
								<!-- <view :style="{color: !v.qualityStatus?'#7FBD1D':'#DD1A32'}"
									v-if="v.componentRecordNode==6||v.componentRecordNode==7">
									（{{v.qualityStatus?'不合格':'合格'}}）
								</view> -->
								<view :style="{color: v.checkResult=='合格'?'#7FBD1D':'#DD1A32'}"
									v-if="[3,4,5,6,7].includes(v.componentRecordNode)">
									（{{v.checkResult}}）
								</view>
								<view :style="{color: v.qualityTestResult=='合格'?'#7FBD1D':'#DD1A32'}" v-if="v.componentRecordNode==9">
									（{{v.qualityTestResult}}）
								</view>
								<view :style="{color: v.repairResult=='合格'?'#7FBD1D':'#DD1A32'}" v-if="v.componentRecordNode==10">
									（{{v.repairResult}}）
								</view>
								<view :style="{color: v.returnRepairResult=='合格'?'#7FBD1D':'#DD1A32'}" v-if="v.componentRecordNode==18">
									（{{v.returnRepairResult}}）
								</view>
								<view :style="{color: v.returnWarehousingResult=='良品'?'#7FBD1D':'#DD1A32'}"
									v-if="v.componentRecordNode==16">
									（{{v.returnWarehousingResult}}）
								</view>
								<view :style="{color: v.returnQualityResult=='合格'?'#7FBD1D':'#DD1A32'}"
									v-if="v.componentRecordNode==17">
									（{{v.returnQualityResult}}）
								</view>
							</view>

							<view class="itemprocess2" v-if="v.componentRecordNode==1">
								<view v-if='v.preparationTime'>
									制单时间：
								</view>
								<view v-if='v.preparationTime'>
									{{v.preparationTime}}
								</view>
							</view>

							<view v-if="v.componentRecordNode==2">
								<view class="itemprocess2" v-if="v.productionTeam">
									<view>
										生产班组：
									</view>
									<view>
										{{v.productionTeam}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.confirmTime">
									<view>
										确认时间：
									</view>
									<view>
										{{v.confirmTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==3">
								<view class="itemprocess2" v-if="v.checkPerson">
									<view>
										检查人：
									</view>
									<view>
										{{v.checkPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.completionTime">
									<view>
										完成时间：
									</view>
									<view>
										{{v.completionTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==4">
								<view class="itemprocess2" v-if="v.checkPerson">
									<view>
										检查人：
									</view>
									<view>
										{{v.checkPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.completionTime">
									<view>
										完成时间：
									</view>
									<view>
										{{v.completionTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==5">
								<view class="itemprocess2" v-if="v.checkPerson">
									<view>
										检查人：
									</view>
									<view>
										{{v.checkPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.completionTime">
									<view>
										完成时间：
									</view>
									<view>
										{{v.completionTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==6">
								<view class="itemprocess2" v-if="v.checkPerson">
									<view>
										检查人：
									</view>
									<view>
										{{v.checkPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.completionTime">
									<view>
										完成时间：
									</view>
									<view>
										{{v.completionTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==7">
								<view class="itemprocess2" v-if="v.checkPerson">
									<view>
										检查人：
									</view>
									<view>
										{{v.checkPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.completionTime">
									<view>
										完成时间：
									</view>
									<view>
										{{v.completionTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==8">
								<view class="itemprocess2" v-if="v.invertNumber">
									<view>
										倒运单号：
									</view>
									<view>
										{{v.invertNumber}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.preparationPerson">
									<view>
										制单人：
									</view>
									<view>
										{{v.preparationPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.preparationTime">
									<view>
										制单时间：
									</view>
									<view>
										{{v.preparationTime}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.dispatchCarName">
									<view>
										发车人：
									</view>
									<view>
										{{v.dispatchCarName}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.dispatchCarTime">
									<view>
										发车时间：
									</view>
									<view>
										{{v.dispatchCarTime}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.toWarehousingName">
									<view>
										倒库人：
									</view>
									<view>
										{{v.toWarehousingName}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.toWarehousingTime">
									<view>
										倒库时间：
									</view>
									<view>
										{{v.toWarehousingTime}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.storageLocation">
									<view>
										堆场位置：
									</view>
									<view>
										{{v.storageLocation}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==9">
								<view class="itemprocess2" v-if="v.qualityTestPerson">
									<view>
										质检人：
									</view>
									<view>
										{{v.qualityTestPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.qualityTestTime">
									<view>
										质检时间：
									</view>
									<view>
										{{v.qualityTestTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==10">
								<view class="itemprocess2" v-if="v.repairPerson">
									<view>
										维修人：
									</view>
									<view>
										{{v.repairPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.repairTime">
									<view>
										维修时间：
									</view>
									<view>
										{{v.repairTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==11">
								<view class="itemprocess2" v-if="v.warehousingConfirmPerson">
									<view>
										入库确认人：
									</view>
									<view>
										{{v.warehousingConfirmPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.inWarehousingTime">
									<view>
										入库时间：
									</view>
									<view>
										{{v.inWarehousingTime}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.storageLocation">
									<view>
										堆场位置：
									</view>
									<view>
										{{v.storageLocation}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==12">
								<view class="itemprocess2" v-if="v.preparationPerson">
									<view>
										制单人：
									</view>
									<view>
										{{v.preparationPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.preparationTime">
									<view>
										制单时间：
									</view>
									<view>
										{{v.preparationTime}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.dispatchCarName">
									<view>
										发车人：
									</view>
									<view>
										{{v.dispatchCarName}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.dispatchCarTime">
									<view>
										发车时间：
									</view>
									<view>
										{{v.dispatchCarTime}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.shippingPerson">
									<view>
										发车人：
									</view>
									<view>
										{{v.shippingPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.shippingTime">
									<view>
										倒库时间：
									</view>
									<view>
										{{v.shippingTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==13">
								<view class="itemprocess2" v-if="v.acceptancePerson">
									<view>
										验收人：
									</view>
									<view>
										{{v.acceptancePerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.acceptanceTime">
									<view>
										验收时间：
									</view>
									<view>
										{{v.acceptanceTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==14">
								<view class="itemprocess2" v-if="v.installPerson">
									<view>
										安装人：
									</view>
									<view>
										{{v.installPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.installTime">
									<view>
										安装时间：
									</view>
									<view>
										{{v.installTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==15">
								<view class="itemprocess2" v-if="v.returnNumber">
									<view>
										退货单号：
									</view>
									<view>
										{{v.returnNumber}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.preparationPerson">
									<view>
										制单人：
									</view>
									<view>
										{{v.preparationPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.preparationTime">
									<view>
										制单时间：
									</view>
									<view>
										{{v.preparationTime}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.dispatchCarName">
									<view>
										发车人：
									</view>
									<view>
										{{v.dispatchCarName}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.dispatchCarTime">
									<view>
										发车时间：
									</view>
									<view>
										{{v.dispatchCarTime}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.returnPerson">
									<view>
										到货人：
									</view>
									<view>
										{{v.returnPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.arrivalTime">
									<view>
										到货时间：
									</view>
									<view>
										{{v.arrivalTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==16">
								<view class="itemprocess2" v-if="v.returnWarehousingPerson">
									<view>
										退货入库人员：
									</view>
									<view>
										{{v.returnWarehousingPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.returnWarehousingTime">
									<view>
										退货入库时间：
									</view>
									<view>
										{{v.returnWarehousingTime}}
									</view>
								</view>
								<!-- <view class="itemprocess2" v-if="v.returnWarehousingResult">
									<view>
										退货入库结果：
									</view>
									<view>
										{{v.returnWarehousingResult}}
									</view>
								</view> -->
							</view>

							<view v-if="v.componentRecordNode==17">
								<view class="itemprocess2" v-if="v.returnQualityPerson">
									<view>
										退货质检人员：
									</view>
									<view>
										{{v.returnQualityPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.returnQualityTime">
									<view>
										退货质检时间：
									</view>
									<view>
										{{v.returnQualityTime}}
									</view>
								</view>
								<!-- <view class="itemprocess2" v-if="v.returnQualityResult">
									<view>
										退货质检结果：
									</view>
									<view>
										{{v.returnQualityResult}}
									</view>
								</view> -->
							</view>

							<view v-if="v.componentRecordNode==18">
								<view class="itemprocess2" v-if="v.returnRepairPerson">
									<view>
										退货维修人员：
									</view>
									<view>
										{{v.returnRepairPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.returnRepairTime">
									<view>
										退货维修时间：
									</view>
									<view>
										{{v.returnRepairTime}}
									</view>
								</view>
								<!-- <view class="itemprocess2" v-if="v.returnRepairResult">
									<view>
										退货维修结果：
									</view>
									<view>
										{{v.returnRepairResult}}
									</view>
								</view> -->
							</view>

							<view v-if="v.componentRecordNode==19">
								<view class="itemprocess2" v-if="v.returnPerson">
									<view>
										退货发运人员：
									</view>
									<view>
										{{v.returnPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.preparationTime">
									<view>
										退货发运时间：
									</view>
									<view>
										{{v.preparationTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==20">
								<view class="itemprocess2" v-if="v.returnRepairPerson">
									<view>
										退货到货人员：
									</view>
									<view>
										{{v.returnRepairPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.returnRepairTime">
									<view>
										退货到货时间：
									</view>
									<view>
										{{v.returnRepairTime}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==21">
								<view class="itemprocess2" v-if="v.checkPerson">
									<view>
										调整人：
									</view>
									<view>
										{{v.checkPerson}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.confirmTime">
									<view>
										调整时间：
									</view>
									<view>
										{{v.confirmTime}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.remark">
									<view>
										调整记录：
									</view>
									<view>
										{{v.remark}}
									</view>
								</view>
							</view>

							<view v-if="v.componentRecordNode==22">
								<view class="itemprocess2" v-if="v.transferBy">
									<view>
										操作人：
									</view>
									<view>
										{{v.transferBy}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.inTransferTime">
									<view>
										移库时间：
									</view>
									<view>
										{{v.inTransferTime}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.originStorageLocation">
									<view>
										原库位：
									</view>
									<view>
										{{v.originStorageLocation}}
									</view>
								</view>
								<view class="itemprocess2" v-if="v.storageLocation">
									<view>
										目标库位：
									</view>
									<view>
										{{v.storageLocation}}
									</view>
								</view>
							</view>

							<view class="itemprocess3" v-if="v.fileList && v.fileList.length">
								<view v-for="vs,i in v.fileList" :key="vs.id">
									<image v-if="!fileType.includes(vs.fileType)" :src="`${BASE_URL}${vs.path}`" mode=""
										style="width: 100rpx;height: 100rpx;border-radius: 8rpx;margin-right: 15rpx;" @click="openfile(vs)">
									</image>
									<view v-else style="font-size: 28rx;color: #18A7F0;" @click="openfile(vs)">
										{{vs.originalFilename}}
									</view>
								</view>
							</view>

							<!-- <view style="padding: 35rpx 0rpx 0rpx 0rpx;margin-left: 35rpx;" v-if="v.remark">
								<view>
									{{v.remark}}
								</view>
							</view>
							<view style="padding: 35rpx 0rpx 0rpx 0rpx;margin-left: 35rpx;" v-if="v.storageLocation">
								<view>
									{{v.storageLocation}}
								</view>
							</view>
							<view style="padding: 35rpx 0rpx 0rpx 0rpx;margin-left: 35rpx;" v-if="v.returnWarehousingResult">
								<view>
									退货入库结果：
								</view>
								<view>
									{{v.returnWarehousingResult}}
								</view>
							</view>
							<view style="padding: 35rpx 0rpx 0rpx 0rpx;margin-left: 35rpx;" v-if="v.returnQualityResult">
								<view>
									退货质检结果：
								</view>
								<view>
									{{v.returnQualityResult}}
								</view>
							</view>
							<view style="padding: 35rpx 0rpx 0rpx 0rpx;margin-left: 35rpx;" v-if="v.returnRepairResult">
								<view>
									退货维修结果：
								</view>
								<view>
									{{v.returnRepairResult}}
								</view>
							</view>
							<view style="padding: 35rpx 0rpx 0rpx 0rpx;margin-left: 35rpx;" v-if="v.returnNumber">
								<view>
									{{v.returnNumber}}
								</view>
							</view>
							<view style="padding: 35rpx 0rpx 0rpx 0rpx;margin-left: 35rpx;" v-if="v.returnRepairResult">
								<view>
									{{v.returnRepairResult}}
								</view>
							</view> -->
							<!-- && (v.componentRecordNode === 4 || v.componentRecordNode === 6) -->
							<view class="itemprocess4" style="color: #18A7F0;font-size: 24rpx;"
								v-if="v.checkItem && v.checkItem.length && (v.componentRecordNode === 4 || v.componentRecordNode === 6)"
								@click="toshowAll(v.prodProcess,v.checkItem,v.fileList,v.concealAcceptRemark,v.inspectionRemark)">
								<view>
									展示更多>>>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view style="background-color: #F2F6FC;height: 128rpx;width: 100%;"></view>
		</view>
		<!-- 按钮 -->
		<view style="padding: 15rpx;" class="btn" v-if="title">
			<u-button type="primary" :text="title" @click="gotoPage"></u-button>
		</view>
	</view>
</template>

<script>
	import BASE_URL from '@/api/env.js'
	import fileUpload from '@/components/fileUpload.vue'
	export default {
		data() {
			return {
				BASE_URL,
				datainfo: {
					storagePagesPageList: []
				},
				drawing_type_info: [],
				data: {
					'生产过程管理': 'pages/workbench/processManage/components/processDetail?',
					'工序调整': 'pages/workbench/processManage/components/processDetail?',
					'入库管理': 'pages/workbench/Warehousing/componentWarehousing?',
					'质检管理': 'pages/workbench/qualityTesting/qualityTestingInfo?',
					'维修管理': 'pages/workbench/repair/repairInfo?',
					'倒运管理': 'pages/workbench/vihicle/ReshipmentManagement/component/Details?',
					'发运管理': 'pages/workbench/Shipping/component/Details?',
					'退货管理': 'pages/workbench/Inventory/component/Details?',
					'退货入库': 'pages/workbench/returnHouse/componentWarehousing?',
					'退货质检': 'pages/workbench/returnquality/qualityTestingInfo?',
					'退货维修': 'pages/workbench/returnRepair/repairInfo?',
					'构件安装': 'pages/workbench/install/component/newEdit?',
					'移库管理': '/pages/workbench/Warehouse/Inventoryinfo?',
				},
				title: '',
				titles: '',
				id: '',
				item: {},
				pdfFilePath: "",
				componentNode: '',
				NodeNameList: [{
						title: "排产已制单",
						node: 1
					},
					{
						title: "接收生产任务",
						node: 2
					},
					{
						title: "钢筋绑扎",
						node: 3
					},
					{
						title: "隐蔽验收",
						node: 4
					},
					{
						title: "浇筑搅拌",
						node: 5
					},
					{
						title: "成品检查",
						node: 6
					},
					{
						title: "已完成",
						node: 7
					},
					{
						title: "构件倒运",
						node: 8
					},
					{
						title: "构件质检",
						node: 9
					},
					{
						title: "构件维修",
						node: 10
					},
					{
						title: "构件入库",
						node: 11
					},
					{
						title: "构件发运",
						node: 12
					},
					{
						title: "构件验收",
						node: 13
					},
					{
						title: "构件安装",
						node: 14
					},
					{
						title: "构件退货",
						node: 15
					},
					{
						title: "构件退货入库",
						node: 16
					},
					{
						title: "构件退货质检",
						node: 17
					},
					{
						title: "构件退货维修",
						node: 18
					},
					{
						title: "构件退货发运",
						node: 19
					},
					{
						title: "构件退货倒库",
						node: 20
					},
					{
						title: "工序调整",
						node: 21
					},
					{
						title: "构件移库",
						node: 22
					},
				],
				fileType: ["pdf", "jpg", "png", "doc", "docx", "PDF", "DOC", "DOCX", "txt"],
			}
		},
		async onLoad({
			data,
			id
		}) {
			let dataItem = JSON.parse(data)
			let componentRecordMap, materialList, steelList;
			await this.$api.pdDeepenDesignComponentDetailDetail({
				id
			}).then(res => {
				componentRecordMap = res.data.componentRecordMap || []
				materialList = res.data.materialList || []
				steelList = res.data.steelList || []
			})
			if (dataItem.componentNode == 6 || dataItem.componentNode == 9) {
				this.id = dataItem.id
				await this.$api.scan_code_warehousing(`${dataItem.id}/8`).then(v => {
					this.item = v.data
				})
			} else if (dataItem.componentNode == 7) {
				this.$api.warehousingstockstructure({
					deepenDesignComponentDetailId: dataItem.id
				}).then(v => {
					this.item = v.rows[0]
				})
			} else if (dataItem.componentNode == 8) {
				this.$api.repairdetail(`/${dataItem.id}/1`).then(v => {
					this.item = v.data
				})
			} else if (dataItem.componentNode == 3 || dataItem.componentNode == 4) {
				this.componentNode = dataItem.componentNode
			} else if (dataItem.componentNode == 16) {
				this.$api.scan_code_returnHouseDetail({
					id: dataItem.componentProcessId,
					queryType: 3,
					returnProcess: 3
				}).then(v => {
					this.item = v.data
				})
			} else if (dataItem.componentNode == 15) {
				this.$api.scan_code_returnHouseDetail({
					id: dataItem.componentProcessId,
					queryType: 2,
					returnProcess: 2
				}).then(v => {
					this.item = v.data
				})
			} else if (dataItem.componentNode == 14) {
				this.$api.scan_code_returnHouseDetail({
					id: dataItem.componentProcessId,
					queryType: 1,
					returnProcess: 1
				}).then(v => {
					this.item = v.data
				})
			}
			switch (dataItem.componentNode) {
				case 3:
					this.title = '生产过程管理'
					this.item = dataItem
					this.id = dataItem.prodProcessId
					break;
				case 4:
					this.title = '生产过程管理'
					this.item = dataItem
					this.id = dataItem.prodProcessId
					break;
				case 5:
					this.id = dataItem.invertId
					this.title = '倒运管理'
					break;
				case 6:
					// this.item = dataItem
					this.title = '入库管理'
					break;
				case 7:
					// this.item = dataItem
					this.title = '移库管理'
					break;
				case 8:
					// this.item = dataItem
					this.title = '维修管理'
					break;
				case 9:
					this.title = '质检管理'
					// this.item = dataItem
					break;
				case 10:
					this.id = dataItem.shipmentId
					this.title = '发运管理'
					break;
				case 12:
					this.id = dataItem.returnId
					this.title = '退货管理'
					break;
				case 13:
					this.id = dataItem.installId
					this.title = '构件安装'
					break;
				case 14:
					this.id = dataItem.componentProcessId
					// this.item = dataItem
					this.title = '退货入库'
					break;
				case 15:
					this.id = dataItem.componentProcessId
					// this.item = dataItem
					this.title = '退货质检'
					break;
				case 16:
					this.id = dataItem.componentProcessId
					this.title = '退货维修'
					break;
				case 17:
					this.id = dataItem.returnId
					this.title = '退货发运'
					break;
			}

			/* let fileIdsList = new Map();
			dataItem.storagePagesPageList?.forEach(v => {
				fileIdsList.set(v.drawingName, {
					responseText: {
						...v,
						fileName: v.filePath,
						fileId: v.id,
					}
				})
			}) */
			let fileIdsList = dataItem.storagePagesPageList
			

			this.datainfo = {
				...dataItem,
				componentRecordMap,
				materialList,
				steelList,
				fileIdsList
			} || {}

			console.log(this.datainfo, 'datainfo');
		},
		components: {
			fileUpload,
		},
		methods: {
			toshowAll(prodProcess, list, fileList, concealAcceptRemark, inspectionRemark) {
				if (prodProcess == 2) {
					this.titles = '隐蔽验收-检查项'
				} else {
					this.titles = '成品检查-检查项'
				}
				uni.navigateTo({
					url: `/pages/workbench/processManage/components/checkItem/checkItem?list=${encodeURIComponent(JSON.stringify(list))}&fileList=${encodeURIComponent(JSON.stringify(fileList))}&prodProcess=${prodProcess}&concealAcceptRemark=${concealAcceptRemark}&inspectionRemark=${inspectionRemark}`
				})
			},
			// 打开文件
			openfile(v) {
				uni.showLoading({
					title: '加载中'
				});
				let url = BASE_URL + v.path
				console.log(url);
				const encodedURL = url.replace(/#/g, '%23');
				console.log(encodedURL);
				if (url.slice(-3) === 'pdf') {
					uni.hideLoading()
					uni.navigateTo({
						url: '/pages/pdf/filePreview?params=' + encodedURL
					})
				} else {
					uni.downloadFile({
						url: BASE_URL + v.path,
						// url: "https://pc.chinaonebuild.com/factory-api" + v.path,
						success: function(res) {
							uni.hideLoading();
							var filePath = res.tempFilePath;
							uni.openDocument({
								filePath: filePath,
								showMenu: true,
							});
						},
						fail: function() {
							uni.hideLoading();
						}
					});
				}
			},
			// 请求字典
			dicts(type = 'materia_name') {
				return new Promise((reslve, reject) => {
					this.$api.dict({
						pageNum: 1,
						pageSize: 999999,
						dictType: type
					}).then(res => {
						reslve(res)
					})
				})
			},
			gotoPage() {
				let url = ''
				console.log(this.datainfo.componentNode);
				switch (this.datainfo.componentNode) {
					case 3:
						url = this.data['生产过程管理'] +
							`id=${this.id}&item=${encodeURIComponent(JSON.stringify(this.item))}&code=1&componentNode=${this.componentNode}`
						break;
					case 4:
						url = this.data['生产过程管理'] +
							`id=${this.id}&item=${encodeURIComponent(JSON.stringify(this.item))}&code=1&componentNode=${this.componentNode}`
						break;
					case 5:
						url = this.data['倒运管理'] +
							`id=${this.id}&item=${encodeURIComponent(JSON.stringify(this.item))}&code=1`
						break;
					case 6:
						url = this.data['入库管理'] + `item=${encodeURIComponent(JSON.stringify(this.item))}&code=1`
						break;
					case 7:
						url = this.data['移库管理'] + `item=${encodeURIComponent(JSON.stringify(this.item))}&code=1`
						break;
					case 8:
						url = this.data['维修管理'] + `item=${encodeURIComponent(JSON.stringify(this.item))}&code=1`
						break;
					case 9:
						url = this.data['质检管理'] + `item=${encodeURIComponent(JSON.stringify(this.item))}&code=1`
						break;
					case 10:
						url = this.data['发运管理'] +
							`id=${this.id}&code=1`
						break;
					case 12:
						url = this.data['退货管理'] + `id=${this.id}&code=1`
						break;
					case 13:
						url = this.data['构件安装'] + `id=${this.id}&code=1`
						break;
					case 17:
						url = this.data['退货管理'] + `id=${this.id}&code=1`
						break;
					case 14:
						url = this.data['退货入库'] + `id=${this.id}&item=${encodeURIComponent(JSON.stringify(this.item))}&code=1`
						break;
					case 15:
						url = this.data['退货质检'] + `id=${this.id}&item=${encodeURIComponent(JSON.stringify(this.item))}&code=1`
						break;
					case 16:
						url = this.data['退货维修'] + `id=${this.id}&item=${encodeURIComponent(JSON.stringify(this.item))}&code=1`
						break;
				}
				uni.navigateTo({
					url,
				})
			},
			filterNode(v) {
				return this.NodeNameList.filter(i => i.node == v)[0].title
			}
		},
		async created() {
			//获取物资类型
			await this.dicts('drawing_type_info').then(res => {
				this.drawing_type_info = res.rows
			})
		}
	}
</script>

<style scoped lang="scss">
	.centeritem {
		@include justify-space-between();
	}

	.items {
		// height: 188rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 28rpx 0rpx;
		border-bottom: 1px solid #eaeef5;

		.titles-min {
			font-size: 24rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			color: #858689;
		}

		.titlesd {
			color: #191919;
			font-size: 28rpx;
			width: 100%;
		}
	}

	.btn {
		position: fixed;
		width: 100vw;
		// padding: 0rpx 20rpx;
		bottom: 20rpx;
		box-sizing: border-box;
	}

	.centerBox {
		height: 100vh;
		background-color: #F2F6FC;

		.centerBox1 {
			background-color: #fff;
			// padding: 0rpx 28rpx 0rpx 28rpx;

			.boxCenter {
				padding: 0rpx 28rpx;

				.boxCenter-item {
					padding: 28rpx 0rpx;
					display: flex;
					justify-content: space-between;
					align-items: center;
					font-size: 28rpx;
					border-bottom: 1rpx solid #C0C4CC;

					.boxCenter-item-left {
						color: #606266;
						width: 40vw;
					}

					.boxCenter-item-right {
						color: #303133;
						text-align: right;
						width: 450rpx;
					}
				}
			}

			.centerBox1-title {
				font-size: 28rpx;
				color: #303133;
				position: relative;
				margin-left: 15rpx;

				&::before {
					// 小圆点在这里
					content: '';
					position: absolute;
					background-color: #2289FF;
					left: -20rpx;
					top: -5rpx;
					display: inline-block; // 此句为css样式展示重点🏁
					width: 12rpx;
					height: 38rpx;
				}
			}
		}
	}

	.aitems {
		padding: 30rpx 0;
		font-size: 30rpx;

		.itemprocess {
			border-left: 5rpx solid #0052D9;

			.itemprocess3 {
				margin-left: 35rpx;
				// padding-bottom: 30rpx;
				padding-top: 35rpx;
				display: flex;
				flex-wrap: wrap;
			}

			.itemprocess2 {
				margin-left: 35rpx;
				padding-top: 35rpx;
				font-size: 28rpx;
				@include justify-space-between()
			}

			.itemprocess4 {
				margin-left: 35rpx;
				padding: 15rpx 0rpx;
				@include justify-space-between()
			}

			.itemprocess1 {
				position: relative;
				padding-left: 35rpx;
				display: flex;

				&::before {
					// 小圆点在这里
					content: '';
					position: absolute;
					left: -13rpx;
					top: 0rpx;
					display: inline-block; // 此句为css样式展示重点🏁
					width: 24rpx;
					height: 24rpx;
					border-radius: 50%;
					margin-right: 12px;
					background-color: #0052D9;
				}
			}

		}
	}
</style>